<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticlesContentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //创建表
        Schema::create('article_content', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');

            $table->string('articletitle2')->comment('简略标题');
            $table->smallInteger('article_id')->comment('对应article表id');
            $table->smallInteger('articlecolumn')->comment('分类栏目');
            $table->smallInteger('articletype')->comment('文章类型');
            $table->smallInteger('articlesort')->comment('排序值');
            $table->string('keywords')->comment('关键词');
            $table->string('abstract')->comment('文章摘要');
            $table->string('author')->comment('文章作者');
            $table->string('sources')->comment('文章来源');
            $table->smallInteger('allowcomments')->comment('允许评论');
            $table->string('picture')->comment('缩略图');
            $table->text('content')->comment('文章内容');

            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('articles');
    }
}
